/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tkatva.soalog.manBeans;

import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import tkatva.soalog.SoalogEjb.entities.*;
import tkatva.soalog.SoalogEjb.dao.*;
/**
 *
 * @author iMac
 */
@ManagedBean
@SessionScoped
public class SoalogSessionBean {

    /**
     * Creates a new instance of SoalogSessionBean
     */
    @EJB 
    SoalogDaoLocal soaDao;
    
    String tstStr;

    public String getTstStr() {
        return tstStr;
    }

    public void setTstStr(String tstStr) {
        this.tstStr = tstStr;
    }
    
    public SoalogSessionBean() {
        
    }
    
    public void testThis() {
        try {
        List<LogInterface> interfaces = soaDao.getAllLogInterfaces();
        for (LogInterface li:interfaces) {
            tstStr = li.getLogInterfaceName() + " "  + li.getLogInterfaceVersion();
        }
        
        
        }
        catch (Exception exp ) {
            exp.printStackTrace();
            tstStr = "Exception occurred : " + exp.toString();
        }
    }
}
